package com.car.loan.project.xr.util.vo;

import com.car.loan.project.xr.domain.LoanAlbum;
import com.car.loan.project.xr.domain.LoanInsurance;
import com.car.loan.project.xr.util.bo.business.ContractInfoBo;
import com.car.loan.project.xr.util.bo.business.CustomerAddBo;
import com.car.loan.project.xr.util.bo.business.LoanAlbumBo;
import com.car.loan.project.xr.util.vo.LoanDetailVo.CarEvaluationInfo;
import com.car.loan.project.xr.util.vo.LoanDetailVo.CreditInfo;
import com.car.loan.project.xr.util.vo.LoanDetailVo.LoanBaseInfoVo;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Map;
import lombok.Data;

/**
 * @author huangding
 * @date 2020/2/18 20:03
 */
@Data
public class LoanContractInfoVo {


    @ApiModelProperty("基本数据")
    private LoanBaseInfoVo loanBaseInfo;

    @ApiModelProperty(value = "用户信息", required = true)
    private CustomerAddBo customerInfo;

    @ApiModelProperty("业务信息")
    private BusinessInfo businessInfo;

    @ApiModelProperty("车辆信息")
    private CarInfo carInfo;

    @ApiModelProperty("保险信息")
    private List<LoanInsurance> insuranceCarInfos = Lists.newArrayList();

    @ApiModelProperty("审批意见，用于提示,提交忽略")
    private String auditRemark;

    @ApiModelProperty("加签意见")
    private String secondAuditRemark;

    @ApiModelProperty("业务建议，用于提示,提交忽略")
    private String businessSuggest;

    @ApiModelProperty("征信信息")
    private List<CreditInfo> creditInfos = Lists.newArrayList();

    @ApiModelProperty("车辆评诂信息")
    private List<CarEvaluationInfo> carEvaluations;

    @ApiModelProperty("附件信息,map类型，key等于附件类型")
    private Map<Integer, List<LoanAlbumBo>> loanAlbumMap;

    @ApiModelProperty("录入信息")
    private ContractInfoBo contractInfo;


    @Data
    public static class BusinessInfo {

        @ApiModelProperty("融资银行")
        private String bankName;

        @ApiModelProperty("车系型号")
        private String carSeries;

        @ApiModelProperty("车辆类型")
        private String carType;

        @ApiModelProperty("新车二手")
        private Integer carNature;

        @ApiModelProperty(value = "合同车价")
        private Double sellAmount;

        @ApiModelProperty(value = "分期金额，单位元", required = true)
        private Double installmentAmount;

        @ApiModelProperty("银行费率")
        private Double bankRate;

        @ApiModelProperty(value = "融资金额", required = true)
        private Double financingAmount;

        @ApiModelProperty(value = "期数", required = true)
        private Long term;

    }

    @Data
    public static class CarInfo {

        @ApiModelProperty("车辆品牌")
        private String bankCarBrand;

        @ApiModelProperty(value = "车辆型号(银行)", required = true)
        private String bankCarType;

        @ApiModelProperty(value = "车架号", required = true)
        private String frameNo;

        @ApiModelProperty(value = "发动机号", required = true)
        private String engineNo;

        @ApiModelProperty(value = "车身颜色", required = true)
        private String color;

        @ApiModelProperty(value = "开票单位", required = true)
        private String invoiceUnit;

        @ApiModelProperty(value = "开票日期yyyy-mm-dd", required = true)
        private String invoiceDate;

        @ApiModelProperty(value = "开票金额", required = true)
        private Double invoicePrice;

        @ApiModelProperty("车牌类型公牌/私牌")
        private String plateType;

        @ApiModelProperty(value = "登记车主", required = true)
        private String registOwner;

        @ApiModelProperty("首次登记日期")
        private String firstRegistDate;

        @ApiModelProperty("本次登记日期")
        private String registDate;

        @ApiModelProperty("上牌省")
        private String registProvince;

        @ApiModelProperty("上牌市")
        private String registCity;

        @ApiModelProperty("车牌号码")
        private String plateNo;

    }


}
